<?php

class SessionManager {

    public function __construct() {
        
    }

    public function start() {
        $SID = session_id();
        if (empty($SID)) {
            session_name('Private');
            session_start() or exit(basename(__FILE__) . '(): Could not start session');
        }
    }
    
    public function destroy() {
        $SID = session_id();
        if (!empty($SID)) {
            session_destroy();
        }
    }
    
    public function get($key){
        return $_SERVER[$key];
    }

    public function set($key,$val){
        return $_SERVER[$key] = $val;
    }
}
?>
